#include <iostream>
#include <algorithm>
using namespace std;
const int N = 1e5 + 10;
int a[N];
int n, k;

int calc(int len)
{
    int ret = 0;
    for(int i = 1;i <= n;i++)
    {
        ret += a[i] / len;
    }

    return ret;
}

int main()
{
    cin >> n >> k;
    int maxlen = 0;
    for(int i = 1;i <= n;i++)
    {
        cin >> a[i];
        maxlen = max(maxlen, a[i]);
    }

    int left = 0, right = maxlen;
    while(left < right)
    {
        int mid = left + (right - left + 1) / 2;
        // 计算该段长下能切多少段
        if(calc(mid) >= k) left = mid;
        else right = mid - 1;
    }

    cout << left << endl;
    return 0;
}